CXX := cc
CXXFLAGS := -std=gnu99 -O2 -Wall -ggdb
    
OBJECTS	:= pscan.o net.o syn.o output.o tblmgr.o
    
portscanner: $(OBJECTS)
	$(CXX) $(OBJECTS) -o portscanner -lpcap -lpthread
    
pscan.o: pscan.c
	$(CXX) $(CXXFLAGS) -c pscan.c
    
net.o: net.c
	$(CXX) $(CXXFLAGS) -c net.c

syn.o: syn.c
	$(CXX) $(CXXFLAGS) -c syn.c

output.o: output.c
	$(CXX) $(CXXFLAGS) -c output.c

tblmgr.o: tblmgr.c
	$(CXX) $(CXXFLAGS) -c tblmgr.c